from django.db import models

# Create your models here.

class meaus(models.Model):
    name = models.CharField(max_length=20,null=True)
    level = models.IntegerField(null=True)
    pid = models.ForeignKey('self',on_delete=models.CASCADE,null=True,related_name='children')
    path = models.CharField(max_length=100,null=True)

    class Meta:
        db_table = 't_meaus'

    # def __str__(self):
    #     return f"{self.name},{self.level},{self.path}"
